package com.woniu.order.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.woniu.order.model.GoodsItem;
import com.woniu.order.dao.GoodsItemDao;
import com.woniu.order.service.GoodsItemService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author 杜岷芫
 * @since 2024年07月12日
 */
@Service
public class GoodsItemServiceImpl extends ServiceImpl<GoodsItemDao, GoodsItem> implements GoodsItemService {
    @Autowired
    private GoodsItemDao goodsItemDao;
    @Override
    public List<GoodsItem> listByClassType(String orderNum) {

        QueryWrapper<GoodsItem> wrapper = new QueryWrapper<>();
        wrapper.eq("order_num",orderNum);
        List<GoodsItem> goodsItems = goodsItemDao.selectList(wrapper);
        return goodsItems;
    }
}
